<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="__ADMIN_LAYUIMINI__/lib/layui-v2.5.5/css/layui.css" media="all">
    <link rel="stylesheet" href="__ADMIN_LAYUIMINI__/css/public.css" media="all">
</head>
<body>
<div class="layuimini-container">
    <div class="layuimini-main">
       
        <table class="layui-hide" id="currentTableId" lay-filter="currentTableFilter"></table>

    </div>
</div>
<script src="__ADMIN_LAYUIMINI__/lib/layui-v2.5.5/layui.js" charset="utf-8"></script>
<script src="__ADMIN_LAYUIMINI__/js/lay-config.js?v=1.0.4" charset="utf-8"></script>
<script>
    layui.use(['form', 'table', 'util', 'notice'], function () {
        var $ = layui.jquery,
            form = layui.form,
            util = layui.util,
            notice = layui.notice,
            table = layui.table;

        table.render({
            elem: '#currentTableId',
            url: "{:url('AdminRole/getRoleToAdmin')}?id={$id}",
            toolbar: '#toolbarDemo',
            defaultToolbar: ['filter', 'exports', 'print', {
                title: '提示',
                layEvent: 'LAYTABLE_TIPS',
                icon: 'layui-icon-tips'
            }],
            cols: [[
                {type: "checkbox", width: 50},
                {field: 'id', width: 80, title: 'ID', sort: true},
                {field: 'username', width: 100, title: '管理员'},
                {field: 'fullname', width: 100, title: '真实姓名'},
                {field: 'phone', width: 200, title: '手机号码'},
                {field: 'email', width: 250, title: '邮箱'},
                {field: 'last_login_time', title: '最后登录时间', templet: function (d) {
                          return util.toDateString(d.last_login_time * 1000, "yyyy-MM-dd HH:mm:ss")
                        }
                },
                {field: 'last_login_ip', title: '最后登录IP'},
            ]],
            limits: [10, 15, 20, 25, 50, 100],
            limit: 10,
            page: true,
            // skin: 'line'
        });

    });
</script>

</body>
</html>